import { useState } from 'react'
import { Bar, ThemeStyle } from './style'

const List = () => {
	const [color, setColor] = useState('red')
	return (
		<Bar color={color}>
			<ThemeStyle>
				<div
					className="button"
					onClick={() => {
						setColor('blue')
					}}
				>
					button
				</div>
				<div
					className="test"
					onClick={() => {
						const dom = document.getElementById('htmlRoot')
						console.dir(dom)
						dom?.setAttribute('data-theme', 'green')
					}}
				>
					test
				</div>
			</ThemeStyle>
		</Bar>
	)
}

type FnType = Promise<{ name: string }>
type ResType = Awaited<FnType>

export default List
